﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class MP : MonoBehaviour
{
    GameObject hero;
    private Slider mp;
    // Use this for initialization
    void Start()
    {
        mp = GetComponent<Slider>();
        hero = GameObject.Find("Garrosh");
    }

    void Update()
    {
        mp.value = ((float)hero.GetComponent<sc>().Magic) / 100.0f;
    }
}
